// 这个url是获取表示自己是守护者时的那一段关系
let communicationGuardUrl = 'ido/app/communication/guard';
// 这个url是获取表示自己是被守护者时的那一段关系
let communicationProtectedUrl = 'ido/app/communication/protected';

let messageListUrl = 'ido/app/message/list'
let messageUrl = 'ido/app/message/read/'


function messageApi(vm){
	// 获取守护关系
	let getCommunicationGuard = (params = {}) => vm.$u.get(communicationGuardUrl, params)
	let getCommunicationProtected = (params = {}) => vm.$u.get(communicationProtectedUrl, params)
	
	// 这是 获取系统消息时的接口
	let getMessageList = (params = {}) => vm.$u.get(messageListUrl, params)
	let getMessage = (params = '') => vm.$u.get(messageUrl + params)
	return {getCommunicationGuard,getCommunicationProtected,getMessageList,getMessage}
}
export default messageApi